Xbasic
TEXT.GET_SELECT Function
Syntax
TextString as C = VariableName.OBJECT.GET_SELECT()
Description
The OBJECT.GET_SELECT() method is used with an Xdialog text control. It returns the currently selected text in the VariableName text variable.
Example
dim ptext as P dim ptext.text as C dim ptext.object as P dim ip as N if a_dlg_button = "copy" then a_dlg_button = "" 'get the current insertion point and selected text ip = ptext.object.get_cursor() selected_text = ptext.object.get_select() ptext.object.copy() ui_dlg_ctl_goto(dlg_title,"ptext") 'restore the current selected text and insertion point ptext.object.select(ip,len(selected_text)) 'this causes the text box to scroll if the insertion point is not currently visible ptext.object.show_caret() end if
Limitations
Desktop applications only.
See Also